package com.sftz.modules.minapp.coursedetailshomework.moudle;

import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok;
import org.nutz.mvc.annotation.Param;

import com.sftz.modules.minapp.coursedetailshomework.form.CourseHomeworkForm;
import com.sftz.modules.minapp.coursedetailshomework.service.CourseHomeworkService;

@IocBean
@At("/wx/homework/")
public class CourseHomeworkModule {
	@Inject
	private CourseHomeworkService homeworkService;

	/**
	 * 课程详情-作业列表
	 * @author	王宏伟
	 * @Date	2018年12月25日
	 */
	@At
	@Ok("json")
	public Object homeworkList(@Param("..") final CourseHomeworkForm form) {
		return homeworkService.getHomeWorkInfos(form.getCourseId(), form.getUserId());
	}

}